package demo07

import demo05.Student1

/**
 * @author xiaoZhao
 * @date 2022/7/26
 * @describe
 */
object Test05_MatchCaseClass {
  def main(args: Array[String]): Unit = {
    val student1 = Student1("alice", 15)

    val result = student1 match {
      case Student1("alice", 15) => "alice, 20"
      case _ => "else"
    }
    println(result)
  }
}

case class Student1(name: String, age: Int)